﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using roster.Domain;

namespace roster.UI
{
    public partial class PlayerSelectionView : Form, IPlayerSelectionView
    {
        public PlayerSelectionView()
        {
            InitializeComponent();
        }

        public IEnumerable<IPlayer> GetPlayersToAdd(IEnumerable<IPlayer> players)
        {
            lstPlayers.AddPlayers(players);
            ShowDialog();
            return lstPlayers.SelectedPlayers;
        }

        private void btnSelect_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}